package com.talent.core.protocol.websocket.zk;

import org.apache.curator.framework.CuratorFramework;
import org.apache.zookeeper.data.Stat;

/**
 * @ClassName：Test
 * @Author: hszhou
 * @Date: 2024/12/9 17:58
 * @Description: 必须描述类做什么事情, 实现什么功能
 */
public class Test {

    public static void main(String[] args) throws Exception {

        CuratorFramework zkClient = CuratorConfig.getClient();

        String path = "/hello";
        byte[] bytes = zkClient.getData().forPath(path);
        String s = new String(bytes);
        System.out.println(s);
        Stat stat = zkClient.checkExists().forPath(path);
        System.out.println(stat);
    }
}
